package com.tju.backend.service.business;


import com.tju.backend.entity.SysUser;
import com.tju.backend.utils.result.*;
import com.tju.backend.utils.tool.ClientParameters;

/**
 * @USER: CLS
 */
public interface SysUserService {


    /**
     * Query the user by account
     *
     * @param username
     * @return
     */
    SysUser getUserByUserName(String username);


    /**
     * Personalized verified login
     *
     * @param username    account number
     * @param rawPassword original password
     * @return
     */
    boolean checkLogin(String username, String rawPassword) throws Exception;


    /**
     * query user
     *
     * @param parameters
     * @return
     */
    Result<Object> selUser(ClientParameters parameters);

    /**
     * add user
     *
     * @param sysUser
     * @return
     */
    Result<Object> addUser(SysUser sysUser);

    /**
     * del user
     *
     * @param sysUser
     * @return
     */
    Result<Object> delUser(SysUser sysUser);

    /**
     * update user
     *
     * @param sysUser
     * @return
     */
    Object updateUser(SysUser sysUser);
}